﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dapper.Sharding.CAP
{
    public class TranMessage
    {
        #region MyRegion

        internal string ServerActor { get; set; }

        /// <summary>
        /// 客户端actor地址
        /// </summary>
        internal string ClientActor { get; set; }

        /// <summary>
        /// 0本地逻辑错误  1成功提交 -1其它微服务事务失败
        /// </summary>
        internal int ClientStatus { get; set; }

        #endregion

        /// <summary>
        /// 服务端令牌
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// 本次事务id
        /// </summary>
        public string TranId { get; set; }

        /// <summary>
        /// 事务名称，客户端自定义，用于区别不客户端
        /// </summary>
        public string TranName { get; set; }

        /// <summary>
        /// 事务预提交
        /// </summary>
        public bool TranPreCommit { get; set; }
    }
}
